package com.gxy.learn.design.model.create.factory.confg_factory;

import lombok.extern.slf4j.Slf4j;

/**
 * @description: 工厂模式扩展测试类
 * @author: gaoxueyong
 * @Date: 2022/11/7 11:18
 */
@Slf4j
public class Client {
    private static final String AMERICA = "america";
    private static final String LATTE = "latte";
    public static void main(String[] args) {
        Coffee coffee = CoffeeFactory.getCoffee(AMERICA);
        log.info(coffee.getName());
        coffee.addMilk();
        coffee.addSugar();
        log.info("===============");
        coffee = CoffeeFactory.getCoffee(LATTE);
        log.info(coffee.getName());
        coffee.addMilk();
        coffee.addSugar();
    }
}
